<!--
 * @Descripttion: 
 * @version: @ 1.0.0
 * @Author: ZJZ
 * @Date: 2021-06-11 14:07:32
 * @LastEditors: 朱江洲
 * @LastEditTime: 2021-11-05 09:23:55
-->
<template>
  <div>
    <el-dialog
      title="新增部门"
      :visible.sync="dialog.dialogDepartmentShow"
      width="30%"
      custom-class="dialogClass"
      :close-on-click-modal="false"
    >
      <el-form
        :model="departmentForm"
        ref="departmentForm"
        :rules="departmentRules"
        label-position="top"
        style="padding-left: 55px"
      >
        <el-form-item label="上级部门">
          <el-select
            v-model="departmentForm.value"
            placeholder="请选择上级部门"
            style="width: 330px"
          >
            <el-option
              v-for="item in options"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="部门名称">
          <el-input
            v-model="departmentForm.departmentName"
            placeholder="请输入部门名"
            style="width: 330px"
          ></el-input>
        </el-form-item>
      </el-form>

      <span slot="footer">
        <el-button @click="dialog.dialogDepartmentShow = false">
          取消
        </el-button>
        <el-button type="primary" @click="onSubmit">保存</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
export default {
  props: {
    dialog: {
      type: Object,
      required: true,
    },
  },
  data() {
    return {
      departmentForm: {
        value: "",
        departmentName: "",
      },
      departmentRules: {},
      options: [
        {
          value: "选项1",
          label: "黄金糕",
        },
        {
          value: "选项2",
          label: "双皮奶",
        },
        {
          value: "选项3",
          label: "蚵仔煎",
        },
        {
          value: "选项4",
          label: "龙须面",
        },
        {
          value: "选项5",
          label: "北京烤鸭",
        },
      ],
    };
  },
  methods: {
    onSubmit() {},
  },
};
</script>

<style lang="less" scoped>

</style>